package com.ushine.mybatisplus.permit.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
@TableName("t_permit")
public class Permit {

    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    private String id;

    @TableField("name")
    private String name;

    @TableField("code")
    private String code;

    @TableField("icon")
    private String icon;

    @TableField("path")
    private String path;

    @TableField("order_num")
    private int orderNum;

    @TableField("type")
    private int type;

    @TableField("parent_id")
    private String parentId;

    @TableField(exist = false)
    private List<Permit> permitList = new ArrayList<>();


}
